package controllers

import "app/util"

type ControllerList struct {
	util.List
}

func NewControllerList() (c *ControllerList) {

	c = &ControllerList{}
	c.AddNode(&HeartController{})
	c.AddNode(&UserController{})
	c.AddNode(&RegisterController{})
	c.AddNode(&AnnounceController{})

	return
}

func (c *ControllerList) AllItem(f func(value ControllerInterface)) {

	c.List.AllList(func(value interface{}) {

		item, ok := value.(ControllerInterface)
		if ok {
			f(item)
		}
	})
}
